<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    <div class="box">
        hello box
    </div>
</body>
<script>

    var span = document.createElement("span");
    // console.log(span);

    var oBox = document.querySelector(".box");
    oBox.appendChild( span );

    // 删除
    // oBox.remove();
    // document.body.removeChild( oBox );

    // 修改
    console.log( oBox.outerHTML );
    oBox.outerHTML = "<p>"+ oBox.innerHTML +"</p>"


    
</script>
</html>